package controlador;

import interfaces.RmiServerIntf;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;

import dto.ClienteDTO;

public class Controlador {
		
	RmiServerIntf instancia_remota;
	
	public Controlador(){
		getStub();
	}
	
	private void getStub(){
		try{
			instancia_remota=(RmiServerIntf)Naming.lookup("//localhost/RmiServer");
			
			System.out.println("Obtenido el servicio remoto: \n "+ instancia_remota.toString() +"\n");
		} catch (MalformedURLException e) {
			e.printStackTrace();
		} catch (RemoteException e) {
			e.printStackTrace();
		} catch (NotBoundException e) {
			e.printStackTrace();
		}
	}
	}
